/// site : "m-team"
/// userId : "123"
/// username : "mayan50"
/// level : "user"
/// uploaded : 1000
/// downloaded : 1000
/// shareRate : 1.0
/// publishNum : 0
/// seedNum : 30
/// seedVolume : 10000
/// bonus : 117726.6
/// integral : 2989.40
/// timeBonus : 60.32
/// createTime : "2024-07-06 22:34:53"

class SiteUserInfo {
  SiteUserInfo({
    int? id,
    String? site,
    int? siteId,
    String? userId,
    String? username,
    String? level,
    double? uploaded,
    double? downloaded,
    double? shareRate,
    double? publishNum,
    double? seedNum,
    double? seedVolume,
    double? bonus,
    double? integral,
    double? timeBonus,
    DateTime? inboundTime,
    DateTime? createTime,
    DateTime? updateTime
  }) {
    _id = id;
    _site = site;
    _siteId = siteId;
    _userId = userId;
    _username = username;
    _level = level;
    _uploaded = uploaded;
    _downloaded = downloaded;
    _shareRate = shareRate;
    _publishNum = publishNum;
    _seedNum = seedNum;
    _seedVolume = seedVolume;
    _bonus = bonus;
    _integral = integral;
    _timeBonus = timeBonus;
    _inboundTime = inboundTime;
    _createTime = createTime;
    _updateTime = updateTime;
  }

  SiteUserInfo.fromJson(dynamic json) {
    _id = json['id'];
    _site = json['site'];
    _siteId = json['siteId'];
    _userId = json['userId'];
    _username = json['username'];
    _level = json['level'];
    _uploaded = json['uploaded'];
    _downloaded = json['downloaded'];
    _shareRate = json['shareRate'];
    _publishNum = json['publishNum'];
    _seedNum = json['seedNum'];
    _seedVolume = json['seedVolume'];
    _bonus = json['bonus'];
    _integral = json['integral'];
    _timeBonus = json['timeBonus'];
    _inboundTime = json['inboundTime'];
    _createTime = json['createTime'];
    _updateTime = json['updateTime'];
  }

  int? _id;
  String? _site;
  int? _siteId;
  String? _userId;
  String? _username;
  String? _level;
  double? _uploaded;
  double? _downloaded;
  double? _shareRate;
  double? _publishNum;
  double? _seedNum;
  double? _seedVolume;
  double? _bonus;
  double? _integral;
  double? _timeBonus;
  DateTime? _inboundTime;
  DateTime? _createTime;
  DateTime? _updateTime;

  SiteUserInfo copyWith({
    int? id,
    String? site,
    int? siteId,
    String? userId,
    String? username,
    String? level,
    double? uploaded,
    double? downloaded,
    double? shareRate,
    double? publishNum,
    double? seedNum,
    double? seedVolume,
    double? bonus,
    double? integral,
    double? timeBonus,
    DateTime? inboundTime,
    DateTime? createTime,
    DateTime? updateTime
  }) =>
      SiteUserInfo(
        id: id ?? _id,
        site: site ?? _site,
        siteId: siteId ?? _siteId,
        userId: userId ?? _userId,
        username: username ?? _username,
        level: level ?? _level,
        uploaded: uploaded ?? _uploaded,
        downloaded: downloaded ?? _downloaded,
        shareRate: shareRate ?? _shareRate,
        publishNum: publishNum ?? _publishNum,
        seedNum: seedNum ?? _seedNum,
        seedVolume: seedVolume ?? _seedVolume,
        bonus: bonus ?? _bonus,
        integral: integral ?? _integral,
        timeBonus: timeBonus ?? _timeBonus,
        inboundTime: inboundTime ?? _inboundTime,
        createTime: createTime ?? _createTime,
        updateTime: updateTime ?? _updateTime,
      );

  int? get id => _id;

  set id(int? value) => _id = value;

  String? get site => _site;

  set site(String? value) => _site = value;

  int? get siteId => _siteId;

  set siteId(int? value) => _siteId = value;

  String? get userId => _userId;

  set userId(String? value) => _userId = value;

  String? get username => _username;

  set username(String? value) => _username = value;

  String? get level => _level;

  set level(String? value) => _level = value;

  double? get uploaded => _uploaded;

  set uploaded(double? value) => _uploaded = value;

  double? get downloaded => _downloaded;

  set downloaded(double? value) => _downloaded = value;

  double? get shareRate => _shareRate;

  set shareRate(double? value) => _shareRate = value;

  double? get publishNum => _publishNum;

  set publishNum(double? value) => _publishNum = value;

  double? get seedNum => _seedNum;

  set seedNum(double? value) => _seedNum = value;

  double? get seedVolume => _seedVolume;

  set seedVolume(double? value) => _seedVolume = value;

  double? get bonus => _bonus;

  set bonus(double? value) => _bonus = value;

  double? get integral => _integral;

  set integral(double? value) => _integral = value;

  double? get timeBonus => _timeBonus;

  set timeBonus(double? value) => _timeBonus = value;

  DateTime? get inboundTime => _inboundTime;

  set inboundTime(DateTime? value) => _inboundTime = value;

  DateTime? get createTime => _createTime;

  set createTime(DateTime? value) => _createTime = value;

  DateTime? get updateTime => _updateTime;

  set updateTime(DateTime? value) => _updateTime = value;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['site'] = _site;
    map['siteId'] = _siteId;
    map['userId'] = _userId;
    map['username'] = _username;
    map['level'] = _level;
    map['uploaded'] = _uploaded;
    map['downloaded'] = _downloaded;
    map['shareRate'] = _shareRate;
    map['publishNum'] = _publishNum;
    map['seedNum'] = _seedNum;
    map['seedVolume'] = _seedVolume;
    map['bonus'] = _bonus;
    map['integral'] = _integral;
    map['timeBonus'] = _timeBonus;
    map['inboundTime'] = _inboundTime;
    map['createTime'] = _createTime;
    map['updateTime'] = _updateTime;
    return map;
  }
}
